home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Programmer Disk
/
The Programmer Disk (Microforum).iso
/
xpro
/
c4
/
pro2
/
1n05052b
< prev
next >
Wrap
Text File
|
1990-07-17
|
923b
|
31 lines
/* Listing2.c */
#include <dos.h>
/******************************************************************
* SetPaletteRegister - modify palette register value
*
* Parameters:
* nRegister (in) - desired register, 0 - 15
* nPaletteNumber (in) - palette number, either 0 - 63 (mode 0)
* or 0 - 15 (mode 1)
*
* Global:
* Turbo C register pseudovariables
*
* Notes:
* 1. Compiled with Turbo C version 3.0
*
* Copyright:
* Original code by William H. Roetzheim (619) 669-6970
* Copyright 1990 by William H. Roetzheim
* All rights reserved.
**********************************************************************/
void SetPaletteRegister (int nRegister, int nPaletteNumber)
{
_AH = 0x10; /* Video function 10h */
_AL = 0x00; /* Subfunction is 00h */
_BL = nRegister; /* Register number to modify */
_BH = nPaletteNumber;
geninterrupt (0x10); /* video service interrupt */
}